﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ywxt.Common;

namespace DB_NH.DB_Model.PWF
{
    /// <summary>
    /// 评委费记录
    /// </summary>
    public class wf_pwf
    {
        #region 数据表名称
        public static readonly string TableName = "wf_pwf";
        #endregion

        #region 数据表字段结构
        public struct Columns
        {
            //ID
            public static readonly string n_id = @"n_id";

            /// <summary>
            /// 标题
            /// </summary>
            public static readonly string title = @"title";

            /// <summary>
            /// 备注
            /// </summary>
            public static readonly string remark = @"remark";

            /// <summary>
            /// 评委人数
            /// </summary>
            public static readonly string pwrs = @"pwrs";

            /// <summary>
            /// 金额合计
            /// </summary>
            public static readonly string jehj = @"jehj";

            /// <summary>
            /// 操作员ID
            /// </summary>
            public static readonly string user_id = @"user_id";

            /// <summary>
            /// 费用所属项目ID
            /// </summary>
            public static readonly string proj_id = @"proj_id";

            /// <summary>
            /// 记录是否有效
            /// </summary>
            public static readonly string is_valid = @"is_valid";

            /// <summary>
            /// 记录创建时间
            /// </summary>
            public static readonly string create_date = @"create_date";
        }
        #endregion

        #region 字段

        /// <summary>
        /// 记录ID，关联申请记录n_id
        /// </summary>
        public virtual string n_id { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public virtual string title { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public virtual string remark { get; set; }

        /// <summary>
        /// 评委人数
        /// </summary>
        public virtual int pwrs { get; set; }

        /// <summary>
        /// 金额合计
        /// </summary>
        public virtual decimal jehj { get; set; }

        /// <summary>
        /// 操作员
        /// </summary>
        public virtual ywxt.t_sys_user user { get; set; }

        /// <summary>
        /// 所属项目
        /// </summary>
        public virtual ywxt.t_project proj { get; set; }

        /// <summary>
        /// 详单记录
        /// </summary>
        public virtual List<wf_pwf_detail> details { get; set; }

        /// <summary>
        /// 记录是否有效
        /// </summary>
        public virtual int is_valid { get; set; }

        /// <summary>
        /// 记录创建时间
        /// </summary>
        public virtual DateTime create_date { get; set; }
        #endregion

        public wf_pwf()
        {
            n_id = Common.NewID();
            is_valid = 1;
            create_date = DateTime.Now;

            proj = new ywxt.t_project();
            details = new List<wf_pwf_detail>();
        }
    }
}
